package com.hopu.service.Impl;

import com.hopu.mapper.RoleMapper;
import com.hopu.pojo.Role;
import com.hopu.service.RoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {

    @Resource
    private RoleMapper roleMapper;

    @Override
    public List<Role> findAllJsName() {
        return roleMapper.findAllJsName();
    }

    @Override
    public List<Role> findAllJs() {
        return roleMapper.findAllJs();
    }

    @Override
    public int addJs(String jname) {
        return roleMapper.addJs(jname);
    }

    @Override
    public int updateJs(String jname, Integer jid) {
        return roleMapper.updateJs(jname,jid);
    }

    @Override
    public Role findJsByNameOrId(String jname, Integer jid) {
        return roleMapper.findJsByNameOrId(jname,jid);
    }
}
